﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ModeloGaleriaNET;

namespace CADs
{
    public class ZonaHorariaCAD: BaseCAD
    {
        public ZonaHorariaCAD()
            : base()
        { }

        public ZonaHoraria GetZonaHorariaByStandardName(string name)
        {
            IEnumerable<ZonaHoraria> zonas = contexto.ZonasHorarias.Where(zh => zh.StandardName.Equals(name));
            return zonas == null || zonas.Count() == 0 ? null : zonas.First();
        }

        public List<String> GetAllZonaStandardName()
        {
            return contexto.ZonasHorarias.Select(zh => zh.StandardName).ToList();
        }
    }
}
